package com.itheima.Stream流;

import java.util.ArrayList;
import java.util.List;

/**
 * @Author 王加鑫
 * @Date 2021/5/17 10:24
 * @Version 1.0
 */
public class Demo01 {
    public static void main(String[] args) {
        ArrayList<String> list = new ArrayList<>
                (List.of("张三丰","张无忌","张翠山","王二麻子","张良","谢广坤"));
        list.stream().filter(s -> s.startsWith("张")).
                filter(s -> s.length() == 3).filter(s -> s.endsWith("山")).forEach(s -> System.out.println(s));

    }
}
